//
//  Muse_ex_font.swift
//  Muse
//
//  Created by mac on 2022/12/6.
//

import UIKit

enum MuseFontStyle {
    case bold, medium, regular, semiBold, italic, balckItalic, semiItalic
    
    var name: String {
        switch self {
        case .bold:
            return "Montserrat-Bold"
        case .medium:
            return "Montserrat-Medium"
        case .regular:
            return "Montserrat-Regular"
        case .semiBold:
            return "Montserrat-SemiBold"
        case .italic:
            return "Montserrat-ExtraBoldItalic"
        case .balckItalic:
            return "Montserrat-BlackItalic"
        case .semiItalic:
            return "Montserrat-SemiBoldItalic"
        }
    }
}

extension CGFloat {
    
    var font_bold: UIFont? {
        UIFont(name: MuseFontStyle.bold.name, size: self)
    }
    
    var font_regular: UIFont? {
        UIFont(name: MuseFontStyle.regular.name, size: self)
    }
    
    var font_medium: UIFont? {
        UIFont(name: MuseFontStyle.medium.name, size: self)
    }
    
    var font_semiBold: UIFont? {
        UIFont(name: MuseFontStyle.semiBold.name, size: self)
    }
    
    var font_italic: UIFont? {
        UIFont(name: MuseFontStyle.italic.name, size: self)
    }
    
    var font_blackItalic: UIFont? {
        UIFont(name: MuseFontStyle.balckItalic.name, size: self)
    }

    var font_semiItalic: UIFont? {
        UIFont(name: MuseFontStyle.semiItalic.name, size: self)
    }
}
extension Double {
    
    var font_bold: UIFont? {
        UIFont(name: MuseFontStyle.bold.name, size: self)
    }
    
    var font_regular: UIFont? {
        UIFont(name: MuseFontStyle.regular.name, size: self)
    }
    
    var font_medium: UIFont? {
        UIFont(name: MuseFontStyle.medium.name, size: self)
    }
    
    var font_semiBold: UIFont? {
        UIFont(name: MuseFontStyle.semiBold.name, size: self)
    }
    
    var font_italic: UIFont? {
        UIFont(name: MuseFontStyle.italic.name, size: self)
    }
    
    var font_blackItalic: UIFont? {
        UIFont(name: MuseFontStyle.balckItalic.name, size: self)
    }
    
    var font_semiItalic: UIFont? {
        UIFont(name: MuseFontStyle.semiItalic.name, size: self)
    }
}
